<?php
namespace App\Http\Libs;

use App\Model\Nav;


class WebCommon
{
    public $nav;//导航栏
    public $rightArticles;//右侧文章栏
    public function __construct()
    {
        $this->init();
    }

    /**
     * 初始化
     *
     * @return void
     */
    public function init()
    {
        $this->getNav();
        $this->getRightArticles();
    }

    /**
     * 获取前端公众导航栏
     *
     * @return void
     */
    public function getNav()
    {
        $this->nav  =   Nav::getHomeNavs();
    }

    /**
     * 获取右侧最新评论文章
     *
     * @param integer $limit
     * @return void
     */
    public function getRightArticles($limit = 10)
    {
        $this->rightArticles    =   'wwww';
    }
}
